package com.sl.plugin.step.selenium.js;

import com.sl.core.engine.data.ProcessCompContextService;
import com.sl.core.engine.meta.ProcessCompDescriptorService;
import com.sl.core.engine.meta.impl.AbstractProcessCompDescriptor;
import com.sl.core.engine.meta.row.ProcessRowDescriptor;
import com.sl.core.engine.step.ProcessCompService;
import lombok.Getter;
import org.openqa.selenium.WebDriver;

import java.util.Map;

/**
 */
@Getter
//@Comp(id = "Js", name = "执行js", desc = "执行js",icon = "<svg t=\"1692263083059\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"9918\" width=\"200\" height=\"200\"><path d=\"M384 384h42.688v42.688H384zM384 426.688h42.688v42.688H384zM426.688 426.688h42.688v42.688h-42.688z\" fill=\"#79BD28\" p-id=\"9919\"></path><path d=\"M469.312 426.688H512v42.688h-42.688zM384 469.312h42.688V512H384z\" fill=\"#79BD28\" p-id=\"9920\"></path><path d=\"M426.688 469.312h42.688V512h-42.688zM512 426.688h42.688v42.688H512zM554.688 426.688h42.688v42.688h-42.688zM597.312 384H640v42.688h-42.688z\" fill=\"#79BD28\" p-id=\"9921\"></path><path d=\"M597.312 426.688H640v42.688h-42.688z\" fill=\"#79BD28\" p-id=\"9922\"></path><path d=\"M597.312 469.312H640V512h-42.688z\" fill=\"#79BD28\" p-id=\"9923\"></path><path d=\"M554.688 469.312h42.688V512h-42.688z\" fill=\"#79BD28\" p-id=\"9924\"></path><path d=\"M512 554.688h42.688v42.688H512z\" fill=\"#E60012\" p-id=\"9925\"></path><path d=\"M512 597.312h42.688V640H512zM469.312 682.688H512v42.688h-42.688zM512 682.688h42.688v42.688H512z\" fill=\"#E60012\" p-id=\"9926\"></path><path d=\"M469.312 725.312H512V768h-42.688zM512 725.312h42.688V768H512zM469.312 554.688H512v42.688h-42.688z\" fill=\"#E60012\" p-id=\"9927\"></path><path d=\"M469.312 597.312H512V640h-42.688z\" fill=\"#E60012\" p-id=\"9928\"></path><path d=\"M384 170.688h42.688v42.688H384zM426.688 170.688h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9929\"></path><path d=\"M426.688 298.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9930\"></path><path d=\"M469.312 298.688H512v42.688h-42.688zM512 298.688h42.688v42.688H512zM554.688 170.688h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9931\"></path><path d=\"M554.688 298.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9932\"></path><path d=\"M597.312 170.688H640v42.624h-42.688z\" fill=\"#FFFFFF\" p-id=\"9933\"></path><path d=\"M597.312 256H640v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9934\"></path><path d=\"M810.688 384h42.688v42.688h-42.688zM810.688 426.688h42.688v42.688h-42.688zM170.688 384h42.688v42.688h-42.688zM170.688 426.688h42.688v42.688h-42.688zM170.688 853.312h42.688V896h-42.688zM213.312 896H256v42.688h-42.688zM256 896h42.688v42.688H256zM298.688 896h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9935\"></path><path d=\"M341.312 896H384v42.688h-42.688zM682.688 896h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9936\"></path><path d=\"M725.312 896H768v42.688h-42.688zM768 896h42.688v42.688H768zM810.688 853.312h42.688V896h-42.688zM384 128h42.688v42.688H384zM426.688 128h42.688v42.688h-42.688zM213.312 341.312H256V384h-42.688zM554.688 128h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9937\"></path><path d=\"M597.312 128H640v42.688h-42.688zM768 341.312h42.688V384H768zM640 896h42.688v42.688H640z\" fill=\"#FFFFFF\" p-id=\"9938\"></path><path d=\"M384 256h42.688v42.688H384zM341.312 170.688H384v42.688h-42.688zM469.312 170.688H512v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9939\"></path><path d=\"M341.312 213.312H384V256h-42.688zM384 213.312h42.688V256H384zM426.688 213.312h42.688V256h-42.688z\" fill=\"#D18341\" p-id=\"9940\"></path><path d=\"M469.312 213.312H512V256h-42.688zM341.312 256H384v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9941\"></path><path d=\"M426.688 256h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9942\"></path><path d=\"M469.312 256H512v42.688h-42.688zM298.688 298.688h42.688v42.688h-42.688zM384 298.688h42.688v42.688H384zM512 170.688h42.688v42.688H512z\" fill=\"#D18341\" p-id=\"9943\"></path><path d=\"M512 213.312h42.688V256H512zM512 256h42.688v42.688H512zM554.688 213.312h42.688V256h-42.688z\" fill=\"#D18341\" p-id=\"9944\"></path><path d=\"M554.688 256h42.688v42.688h-42.688z\" fill=\"#FFFFFF\" p-id=\"9945\"></path><path d=\"M597.312 213.312H640V256h-42.688zM597.312 298.688H640v42.688h-42.688zM640 213.312h42.688V256H640zM640 256h42.688v42.688H640zM640 170.688h42.688v42.624H640zM426.688 42.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9946\"></path><path d=\"M469.312 42.688H512v42.688h-42.688zM384 85.312h42.688V128H384z\" fill=\"#D18341\" p-id=\"9947\"></path><path d=\"M426.688 85.312h42.688V128h-42.688z\" fill=\"#D18341\" p-id=\"9948\"></path><path d=\"M469.312 85.312H512V128h-42.688zM512 42.688h42.688v42.688H512z\" fill=\"#D18341\" p-id=\"9949\"></path><path d=\"M512 85.312h42.688V128H512zM554.688 42.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9950\"></path><path d=\"M554.688 85.312h42.688V128h-42.688z\" fill=\"#D18341\" p-id=\"9951\"></path><path d=\"M597.312 85.312H640V128h-42.688zM682.688 298.688h42.688v42.688h-42.688zM682.688 384h42.688v42.688h-42.688zM682.688 426.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9952\"></path><path d=\"M682.688 469.312h42.688V512h-42.688zM725.312 384H768v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9953\"></path><path d=\"M725.312 426.688H768v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9954\"></path><path d=\"M725.312 469.312H768V512h-42.688zM768 384h42.688v42.688H768zM768 426.688h42.688v42.688H768z\" fill=\"#D18341\" p-id=\"9955\"></path><path d=\"M768 469.312h42.688V512H768zM682.688 725.312h42.688V768h-42.688zM725.312 768H768v42.688h-42.688zM768 810.688h42.688v42.688H768zM853.312 384H896v42.688h-42.688zM853.312 426.688H896v42.688h-42.688zM128 384h42.688v42.688H128zM213.312 384H256v42.688h-42.688zM256 384h42.688v42.688H256zM298.688 384h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9956\"></path><path d=\"M341.312 384H384v42.688h-42.688zM426.688 384h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9957\"></path><path d=\"M469.312 384H512v42.688h-42.688zM128 426.688h42.688v42.688H128zM213.312 426.688H256v42.688h-42.688zM256 426.688h42.688v42.688H256zM298.688 426.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9958\"></path><path d=\"M341.312 426.688H384v42.688h-42.688zM213.312 469.312H256V512h-42.688z\" fill=\"#D18341\" p-id=\"9959\"></path><path d=\"M298.688 469.312h42.688V512h-42.688zM512 384h42.688v42.688H512zM512 469.312h42.688V512H512zM384 512h42.688v42.688H384zM426.688 512h42.688v42.688h-42.688zM554.688 384h42.688v42.688h-42.688zM554.688 512h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9960\"></path><path d=\"M597.312 512H640v42.688h-42.688zM384 554.688h42.688v42.688H384zM426.688 554.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9961\"></path><path d=\"M426.688 597.312h42.688V640h-42.688zM341.312 640H384v42.688h-42.688zM384 640h42.688v42.688H384zM426.688 640h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9962\"></path><path d=\"M469.312 640H512v42.688h-42.688zM512 640h42.688v42.688H512zM597.312 554.688H640v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9963\"></path><path d=\"M597.312 597.312H640V640h-42.688zM554.688 640h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9964\"></path><path d=\"M597.312 640H640v42.688h-42.688zM341.312 682.688H384v42.688h-42.688zM384 682.688h42.688v42.688H384zM426.688 682.688h42.688v42.688h-42.688zM554.688 682.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9965\"></path><path d=\"M597.312 682.688H640v42.688h-42.688zM341.312 725.312H384V768h-42.688zM384 725.312h42.688V768H384zM426.688 725.312h42.688V768h-42.688zM384 768h42.688v42.688H384zM426.688 768h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9966\"></path><path d=\"M469.312 768H512v42.688h-42.688zM512 768h42.688v42.688H512zM554.688 725.312h42.688V768h-42.688zM426.688 810.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9967\"></path><path d=\"M469.312 810.688H512v42.688h-42.688zM256 768h42.688v42.688H256zM298.688 768h42.688v42.688h-42.688zM213.312 810.688H256v42.688h-42.688zM256 810.688h42.688v42.688H256zM298.688 810.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9968\"></path><path d=\"M341.312 810.688H384v42.688h-42.688zM597.312 768H640v42.688h-42.688zM554.688 810.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9969\"></path><path d=\"M597.312 810.688H640v42.688h-42.688zM128 853.312h42.688V896H128zM213.312 853.312H256V896h-42.688zM256 853.312h42.688V896H256zM298.688 853.312h42.688V896h-42.688z\" fill=\"#D18341\" p-id=\"9970\"></path><path d=\"M341.312 853.312H384V896h-42.688zM384 853.312h42.688V896H384zM554.688 853.312h42.688V896h-42.688z\" fill=\"#D18341\" p-id=\"9971\"></path><path d=\"M597.312 853.312H640V896h-42.688zM128 896h42.688v42.688H128zM170.688 896h42.688v42.688h-42.688zM170.688 938.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9972\"></path><path d=\"M213.312 938.688H256v42.688h-42.688zM256 938.688h42.688v42.688H256zM298.688 938.688h42.688v42.688h-42.688zM682.688 853.312h42.688V896h-42.688zM682.688 938.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9973\"></path><path d=\"M682.688 810.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9974\"></path><path d=\"M725.312 853.312H768V896h-42.688zM725.312 938.688H768v42.688h-42.688zM768 938.688h42.688v42.688H768zM810.688 896h42.688v42.688h-42.688zM810.688 938.688h42.688v42.688h-42.688zM853.312 853.312H896V896h-42.688z\" fill=\"#D18341\" p-id=\"9975\"></path><path d=\"M853.312 896H896v42.688h-42.688zM512 810.688h42.688v42.688H512zM554.688 768h42.688v42.688h-42.688zM597.312 725.312H640V768h-42.688zM682.688 768h42.688v42.688h-42.688zM725.312 810.688H768v42.688h-42.688zM426.688 853.312h42.688V896h-42.688zM768 853.312h42.688V896H768zM341.312 128H384v42.688h-42.688zM469.312 128H512v42.688h-42.688zM128 341.312h42.688V384H128zM170.688 341.312h42.688V384h-42.688zM256 341.312h42.688V384H256zM341.312 341.312H384V384h-42.688zM384 341.312h42.688V384H384zM426.688 341.312h42.688V384h-42.688z\" fill=\"#D18341\" p-id=\"9976\"></path><path d=\"M469.312 341.312H512V384h-42.688zM512 128h42.688v42.688H512zM512 341.312h42.688V384H512zM554.688 341.312h42.688V384h-42.688z\" fill=\"#D18341\" p-id=\"9977\"></path><path d=\"M597.312 341.312H640V384h-42.688zM640 128h42.688v42.688H640zM640 341.312h42.688V384H640zM640 384h42.688v42.688H640zM640 426.688h42.688v42.688H640z\" fill=\"#D18341\" p-id=\"9978\"></path><path d=\"M640 469.312h42.688V512H640zM640 512h42.688v42.688H640zM640 640h42.688v42.688H640zM725.312 341.312H768V384h-42.688zM640 682.688h42.688v42.688H640z\" fill=\"#D18341\" p-id=\"9979\"></path><path d=\"M640 725.312h42.688V768H640zM640 768h42.688v42.688H640zM640 810.688h42.688v42.688H640zM810.688 341.312h42.688V384h-42.688z\" fill=\"#D18341\" p-id=\"9980\"></path><path d=\"M853.312 341.312H896V384h-42.688zM640 853.312h42.688V896H640zM256 469.312h42.688V512H256zM341.312 469.312H384V512h-42.688zM469.312 469.312H512V512h-42.688zM341.312 512H384v42.688h-42.688zM469.312 512H512v42.688h-42.688zM512 512h42.688v42.688H512zM384 597.312h42.688V640H384zM554.688 554.688h42.688v42.688h-42.688z\" fill=\"#D18341\" p-id=\"9981\"></path><path d=\"M554.688 597.312h42.688V640h-42.688zM298.688 725.312h42.688V768h-42.688zM341.312 768H384v42.688h-42.688zM384 810.688h42.688v42.688H384z\" fill=\"#D18341\" p-id=\"9982\"></path><path d=\"M298.688 170.688h42.688v42.688h-42.688z\" p-id=\"9983\"></path><path d=\"M298.688 213.312h42.688V256h-42.688zM298.688 256h42.688v42.688h-42.688zM128 298.688h42.688v42.688H128zM170.688 298.688h42.688v42.688h-42.688z\" p-id=\"9984\"></path><path d=\"M213.312 298.688H256v42.688h-42.688zM256 298.688h42.688v42.688H256zM341.312 298.688H384v42.688h-42.688zM682.688 213.312h42.624V256h-42.624zM682.688 170.688h42.688v42.624h-42.688zM341.312 42.688H384v42.688h-42.688zM384 42.688h42.688v42.688H384z\" p-id=\"9985\"></path><path d=\"M341.312 85.312H384V128h-42.688zM597.312 42.688H640v42.688h-42.688zM640 42.688h42.688v42.688H640z\" p-id=\"9986\"></path><path d=\"M640 85.312h42.688V128H640zM725.312 298.688H768v42.688h-42.688zM768 298.688h42.688v42.688H768zM810.688 298.688h42.688v42.688h-42.688z\" p-id=\"9987\"></path><path d=\"M853.312 298.688H896v42.688h-42.688zM682.688 512h42.688v42.688h-42.688z\" p-id=\"9988\"></path><path d=\"M725.312 512H768v42.688h-42.688zM768 512h42.688v42.688H768zM682.688 640h42.688v42.688h-42.688zM682.688 682.688h42.688v42.688h-42.688z\" p-id=\"9989\"></path><path d=\"M725.312 725.312H768V768h-42.688zM768 768h42.688v42.688H768zM810.688 469.312h42.688V512h-42.688zM810.688 810.688h42.688v42.688h-42.688z\" p-id=\"9990\"></path><path d=\"M853.312 469.312H896V512h-42.688zM896 384h42.688v42.688H896zM896 426.688h42.688v42.688H896zM85.312 384H128v42.688h-42.688zM85.312 426.688H128v42.688h-42.688zM213.312 512H256v42.688h-42.688zM298.688 512h42.688v42.688h-42.688zM298.688 640h42.688v42.688h-42.688zM298.688 682.688h42.688v42.688h-42.688zM213.312 768H256v42.688h-42.688zM170.688 810.688h42.688v42.688h-42.688zM85.312 853.312H128V896h-42.688zM512 853.312h42.688V896H512zM85.312 896H128v42.688h-42.688zM384 896h42.688v42.688H384zM426.688 896h42.688v42.688h-42.688zM128 938.688h42.688v42.688H128zM341.312 938.688H384v42.688h-42.688zM554.688 896h42.688v42.688h-42.688z\" p-id=\"9991\"></path><path d=\"M597.312 896H640v42.688h-42.688zM896 853.312h42.688V896H896zM853.312 938.688H896v42.688h-42.688zM896 896h42.688v42.688H896zM853.312 810.688H896v42.688h-42.688zM469.312 853.312H512V896h-42.688zM426.688 0h42.688v42.688h-42.688z\" p-id=\"9992\"></path><path d=\"M469.312 0H512v42.688h-42.688zM298.688 128h42.688v42.688h-42.688zM85.312 341.312H128V384h-42.688zM298.688 341.312h42.688V384h-42.688zM512 0h42.688v42.688H512zM554.688 0h42.688v42.688h-42.688zM640 298.688h42.688v42.688H640zM640 554.688h42.688v42.688H640z\" p-id=\"9993\"></path><path d=\"M640 597.312h42.688V640H640zM682.688 128h42.688v42.688h-42.688zM682.688 256h42.688v42.688h-42.688zM682.688 341.312h42.688V384h-42.688zM896 341.312h42.688V384H896zM170.688 981.312h42.688V1024h-42.688z\" p-id=\"9994\"></path><path d=\"M213.312 981.312H256V1024h-42.688zM256 981.312h42.688V1024H256zM298.688 981.312h42.688V1024h-42.688zM640 938.688h42.688v42.688H640zM682.688 981.312h42.688V1024h-42.688z\" p-id=\"9995\"></path><path d=\"M725.312 981.312H768V1024h-42.688zM768 981.312h42.688V1024H768zM810.688 981.312h42.688V1024h-42.688zM128 469.312h42.688V512H128zM170.688 469.312h42.688V512h-42.688zM256 512h42.688v42.688H256zM341.312 554.688H384v42.688h-42.688z\" p-id=\"9996\"></path><path d=\"M341.312 597.312H384V640h-42.688zM256 725.312h42.688V768H256zM128 810.688h42.688v42.688H128z\" p-id=\"9997\"></path></svg>",groupName = "浏览器操作")
public class SeleniumJsCompCompDescriptor extends AbstractProcessCompDescriptor<
        SeleniumJsComp,SeleniumJsCompContext> implements ProcessCompDescriptorService {


//    @Override
//    protected ProcessCompService getComp() {
//        return new SeleniumJsComp(this);
//    }
//
//    @Override
//    public ProcessCompContextService getContext() {
//        return new SeleniumJsCompContext();
//    }

    @Override
    public void loadDescriptor(Map<String, Object> map) {
        excludeSerializableClass.add(WebDriver.class);
    }


    @Override
    public ProcessRowDescriptor getResultDescriptor(ProcessRowDescriptor rowDescriptor) {
        rowDescriptor.clear();
        rowDescriptor.addObj("webDriver");
        return rowDescriptor;
    }
}
